package com.startup.yellocar.dto;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Entity
@Table(name = "quarter")
@PrimaryKeyJoinColumn(name="id")
public class QuarterDTO extends LocalisationDTO{

	@Column(name = "code")
	public String code;
	@Column(name = "name")
	public String name;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "idcity")
	private CityDTO city;
	
	public QuarterDTO() {
		super();
	}

	public QuarterDTO(String code, String name) {
		super();
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public CityDTO getCity() {
		return city;
	}

	public void setCity(CityDTO city) {
		this.city = city;
	}


}
